// API响应基础类型
export interface APIResult<T = any> {
  code: number;
  message: string;
  data: T;
  token?: string;
  refreshToken?: string;
}

// 分页数据类型
export interface APIPaging<T = any> {
  totalCount: number;
  pageIndex: number;
  pageSize: number;
  totalPages: number;
  data: T[];
}

// 供应商相关类型
export interface SupplierDto {
  id: number;
  supplierNumber: string;
  supplierName: string;
  companyName?: string;
  supplierLevelId?: number;
  supplierLevelName?: string;
  supplierCategoryId?: number;
  supplierCategoryName?: string;
  supplierType: number;
  supplierTypeName: string;
  supplierStatus: number;
  supplierStatusName: string;
  purchaseRepresentativeId?: number;
  purchaseRepresentativeName?: string;
  supplierSource?: string;
  businessNatureId?: number;
  businessNatureName?: string;
  industryId?: number;
  industryName?: string;
  locationId?: number;
  locationName?: string;
  unifiedSocialCreditCode?: string;
  isEnabled: boolean;
  remarks?: string;
  contactPerson?: string;
  contactPhone?: string;
  email?: string;
  createTime: string;
  updateTime?: string;
}

export interface SupplierDetailDto extends SupplierDto {
  // 可以添加更多详细字段
}

// 仓库相关类型
export interface WarehouseDto {
  id: number;
  warehouseNumber: string;
  warehouseName: string;
  parentId?: number;
  parentName?: string;
  categoryId: number;
  categoryName: string;
  storageTypeId?: number;
  storageTypeName?: string;
  structureId?: number;
  structureName?: string;
  personInChargeId?: number;
  personInChargeName?: string;
  address?: string;
  remarks?: string;
  isEnabled: boolean;
  isSystemNumber: boolean;
  createTime: string;
}

export interface WarehouseDetailDto extends WarehouseDto {
  // 可以添加更多详细字段
}

// 数据字典类型
export interface BusinessPartnerLevel {
  id: number;
  name: string;
  description?: string;
  isEnabled: boolean;
}

export interface BusinessPartnerCategory {
  id: number;
  name: string;
  description?: string;
  isEnabled: boolean;
}

export interface BusinessNature {
  id: number;
  name: string;
  description?: string;
  isEnabled: boolean;
}

export interface Industry {
  id: number;
  name: string;
  description?: string;
  isEnabled: boolean;
}

export interface Location {
  id: number;
  name: string;
  description?: string;
  isEnabled: boolean;
}

export interface WarehouseCategory {
  id: number;
  categoryName: string;
  description?: string;
  isEnabled: boolean;
}

export interface StorageType {
  id: number;
  typeName: string;
  description?: string;
  isEnabled: boolean;
}

export interface WarehouseStructure {
  id: number;
  structureName: string;
  description?: string;
  isEnabled: boolean;
}

export interface Person {
  id: number;
  personName: string;
  userName?: string;
  email?: string;
  phone?: string;
  isEnabled: boolean;
}

// 查询参数类型
export interface GetSupplierListQuery {
  pageIndex: number;
  pageSize: number;
  keyword?: string;
  supplierLevelId?: number;
  supplierCategoryId?: number;
  supplierStatus?: number;
  isEnabled?: boolean;
}

export interface GetWarehouseListQuery {
  pageIndex: number;
  pageSize: number;
  keyword?: string;
  categoryId?: number;
  storageTypeId?: number;
  structureId?: number;
  isEnabled?: boolean;
}

// 创建/更新命令类型
export interface CreateSupplierCommand {
  supplierNumber?: string;
  supplierName: string;
  companyName?: string;
  partnerLevelId?: number;
  partnerCategoryId?: number;
  supplierType: number;
  supplierStatus: number;
  purchaseRepresentativeId?: number;
  supplierSource?: string;
  businessNatureId?: number;
  industryId?: number;
  locationId?: number;
  unifiedSocialCreditCode?: string;
  isEnabled: boolean;
  remarks?: string;
  contactPerson?: string;
  contactPhone?: string;
  email?: string;
}

export interface UpdateSupplierCommand extends CreateSupplierCommand {
  id: number;
}

export interface DeleteSupplierCommand {
  id: number;
}

export interface CreateWarehouseCommand {
  warehouseNumber?: string;
  warehouseName: string;
  parentId?: number;
  categoryId: number;
  storageTypeId?: number;
  structureId?: number;
  personInChargeId?: number;
  address?: string;
  remarks?: string;
  isEnabled: boolean;
}

export interface UpdateWarehouseCommand extends CreateWarehouseCommand {
  id: number;
}

export interface DeleteWarehouseCommand {
  id: number;
} 